package com.laowang.project.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.laowang.project.system.mapper.MyCyhShopProductMapper;
import com.laowang.project.system.domain.MyCyhShopProduct;
import com.laowang.project.system.service.MyCyhShopProductService;

/**
 * 商家团购产品Service业务层处理
 *
 * @author laowang
 * @date 2023-07-24
 */
@Service
public class MyCyhShopProductServiceImpl implements MyCyhShopProductService {
    @Autowired
    private MyCyhShopProductMapper myCyhShopProductMapper;

    /**
     * 查询商家团购产品
     *
     * @param id 商家团购产品ID
     * @return 商家团购产品
     */
    @Override
    public MyCyhShopProduct selectMyCyhShopProductById(Integer id) {
        return myCyhShopProductMapper.selectMyCyhShopProductById(id);
    }

    /**
     * 查询商家团购产品列表
     *
     * @param myCyhShopProduct 商家团购产品
     * @return 商家团购产品
     */
    @Override
    public List<MyCyhShopProduct> selectMyCyhShopProductList(MyCyhShopProduct myCyhShopProduct) {
        return myCyhShopProductMapper.selectMyCyhShopProductList(myCyhShopProduct);
    }

    /**
     * 新增商家团购产品
     *
     * @param myCyhShopProduct 商家团购产品
     * @return 结果
     */
    @Override
    public int insertMyCyhShopProduct(MyCyhShopProduct myCyhShopProduct) {
        return myCyhShopProductMapper.insertMyCyhShopProduct(myCyhShopProduct);
    }

    /**
     * 修改商家团购产品
     *
     * @param myCyhShopProduct 商家团购产品
     * @return 结果
     */
    @Override
    public int updateMyCyhShopProduct(MyCyhShopProduct myCyhShopProduct) {
        return myCyhShopProductMapper.updateMyCyhShopProduct(myCyhShopProduct);
    }

    /**
     * 批量删除商家团购产品
     *
     * @param ids 需要删除的商家团购产品ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhShopProductByIds(Integer[] ids) {
        return myCyhShopProductMapper.deleteMyCyhShopProductByIds(ids);
    }

    /**
     * 删除商家团购产品信息
     *
     * @param id 商家团购产品ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhShopProductById(Integer id) {
        return myCyhShopProductMapper.deleteMyCyhShopProductById(id);
    }

    @Override
    public List<MyCyhShopProduct> selectMyCyhShopProductListWeb(MyCyhShopProduct myCyhShopProduct) {
        return myCyhShopProductMapper.selectMyCyhShopProductListWeb(myCyhShopProduct);
    }

    @Override
    public List<MyCyhShopProduct> selectMyCyhShopProductListMe(String[] split) {
        return myCyhShopProductMapper.selectMyCyhShopProductListMe(split);
    }

    @Override
    public List<Integer> selectByCattleUserId(Integer mid) {
        return myCyhShopProductMapper.selectByCattleUserId(mid);
    }
}
